The present invention relates to the database field, and more particularly, to a method and device for generating a schema of a NoSQL (“Not-only-Structured-Query-Language”) database. A NoSQL database provides a mechanism for storage and retrieval of data that is modeled in means other than the tabular relations used in relational databases. Typical motivations for this approach include simplicity of design, horizontal scaling, and finer control over availability.
Some NoSQL databases have features of self-organizing, self-managing, low cost, high scalability, high concurrency, simply query relation, and so on. To compare a NoSQL database to a relational database, a form in the relational database usually stores a formatted data structure, and components of all entry fields are the same. Even if not every entry needs all fields, the relational database will allocate all fields to each entry. Such structure can potentially cause a performance bottleneck in a relational database. On the other hand, a NoSQL database typically carries out storage with a Key/Value pair, and its structure is not fixed. Each entry can have different fields, and each entry can add some key value pairs of its own according to a requirement so as not to be limited to the fixed structure and to thereby reduce some time and space overheads.